import request from '@/utils/request'
const baseUrl = '/eduservice/chapter'
export default {
    /**
     * 查询章节小结树形结构
     * @returns 
     */
     getCharterVideo(courseId) {
        return request({
            url:  baseUrl + `/getCharterVideo/${courseId}`,
            method: 'get',
        })
    },
    /**
     * 根据id删除实体信息
     * @returns 
     */
     deleteEntityById(courseId) {
        return request({
            url:  baseUrl + `/deleteEntityById/${courseId}`,
            method: 'delete',
        })
    },

    /**
     * 根据id获取章节信息
     * @returns 
     */
     getChapterInfo(courseId) {
        return request({
            url:  baseUrl + `/getChapterInfo/${courseId}`,
            method: 'get',
        })
    },
    /**
     * 保存章节信息
     * @returns 
     */
     saveEntity(chapter) {
        return request({
            url:  baseUrl + `/saveEntity`,
            method: 'post',
            data:{...chapter}
        })
    },
    /**
     * 修改章节信息
     * @returns 
     */
     updateEntity(chapter) {
        return request({
            url:  baseUrl + `/updateEntity`,
            method: 'put',
            data:{...chapter}
        })
    },
}